package cn.etg.observer.impl;

import cn.etg.observer.Observer;
import cn.etg.observer.Subject;


public class ObserverSecond implements Observer {

    private Subject subject;

    public ObserverSecond(Subject subject){
        this.subject=subject;
        subject.registerObserver(this);
    }
    @Override
    public void update(String msg) {
        System.out.println("observerSecond 得到 3D 号码 -->" + msg + "我要告诉舍友们。");
    }
}
